function buling(data: any) {
    return data > 9 ? data : " 0" + data;
}
function diffTime(date: any) {
    let nowTime = new Date();
    let diff = (new Date(date) - nowTime) / 1000;
    let sec = buling(parseInt(diff % 60));
    let min = buling(parseInt((diff / 60) % 60));
    let hour = buling(parseInt((diff / 60 / 60) % 24));
    console.log(hour + ":" + min + ":" + sec)
    return {
        sec,
        min,
        hour,
        end: sec == "00" && min == "00" && hour == "00"
    }
}
export default diffTime